Marine fishes that spawn at the water's edge or even out of water provide their eggs with the advantages of the warmer temperatures and high oxygen availability of the high intertidal zone. However, they increase the risks of desiccation and terrestrial predation. Beach spawners are present in at least 6 families of teleost fishes. Two hypotheses about the origin of beach spawning are tested by mapping of reproductive habitat and spawning site utilization onto phylogenies of two families that contain multiple species that spawn on beaches: Osmeridae, the smelts, and Atherinopsidae, the silversides. Our analysis suggests that beach spawning has evolved repeatedly in certain lineages, and that its antecedents are different for each family. Anadromy appears to have been the precursor for at least 3 different evolutionary origins of beach spawning in osmerids, while nearshore marine spawning in association with plant or gravel substrates was probably the precursor for the atherinopsids. Phylogenetic analysis enables us to reject or support specific evolutionary hypotheses for each clade.